local yingshi = fk.CreateSkill {
  name = "lvshi__yingshi",
}
Fk:loadTranslationTable{
  ["lvshi__yingshi"] = "鹰视",
  [":lvshi__yingshi"] = "一轮开始时，你可选择至多X名角色并摸等量的牌（X为你的体力上限），此轮这些角色的回合开始时，你须将一张牌置于牌堆顶。",
  ["#lvshi__yingshi-choose"] = "鹰视：你可以选择%arg名角色",
  ["#lvshi__yingshi-card"] = "鹰视：请选择一张牌置于牌堆顶",
  ["@@ls__yingshi-round"] = "鹰视",

  ["$lvshi__yingshi1"] = "烽烟起大荒，戎军远役，问不臣者谁？",
  ["$lvshi__yingshi2"] = "挥斥千军之贲，长驱万里之远。",
}

yingshi:addEffect(fk.RoundStart, {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(yingshi.name)
  end,
  on_cost = function(self, event, target, player, data)
    local room = player.room
    local to = room:askToChoosePlayers(player, {
      min_num = 1,
      max_num = player.maxHp,
      targets = room.alive_players,
      skill_name = yingshi.name,
      prompt = "#lvshi__yingshi-choose:::"..player.maxHp,
      cancelable = true,
    })
    if #to > 0 then
      event:setCostData(self, {tos = to})
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    local tos = event:getCostData(self).tos
    player:drawCards(#tos, yingshi.name)
    table.forEach(tos, function(p) return player.room:addPlayerMark(p, "@@ls__yingshi-round") end)
    player.room:setPlayerMark(player, "yingshi-round", table.map(tos, Util.IdMapper))
  end,
})

yingshi:addEffect(fk.TurnStart, {
  anim_type = "control",
  is_delay_effect = true,
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(yingshi.name) and table.contains(player:getTableMark("yingshi-round"), target.id)
    and not player:isNude()
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local card = room:askToCards(player, {
      min_num = 1,
      max_num = 1,
      include_equip = true,
      prompt = "#lvshi__yingshi-card",
      skill_name = yingshi.name,
      cancelable = false,
    })
    room:moveCards({
      ids = card,
      from = player,
      toArea = Card.DrawPile,
      moveReason = fk.ReasonJustMove,
      skillName = yingshi.name,
    })
  end,
})
return yingshi